package com.umakr.ax.common.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.umakr.ax.common.model.Msg;
import com.umakr.ax.common.vo.MsgSeekHelpInfoVO;
import com.umakr.ax.core.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
public interface MsgMapper extends BaseMapper<Msg> {
    Page<MsgSeekHelpInfoVO> listMsg(@Param("rsId") Long rsId,  @Param("status") Integer status, @Param("latestTime") Date latestTime);
    List<MsgSeekHelpInfoVO> listMoreMsg(@Param("rsId") Long rsId,  @Param("status") Integer status, @Param("latestTime") Date latestTime);
    void updateMsgStatus(@Param("id")Long id,@Param("status") Integer status,@Param("curUserId") Long curUserId,@Param("curUserName") String curUserName,@Param("date") Date date);
    void updateMsgStatusByTime(@Param("rsId")Long rsId,@Param("customizeTime")Date customizeTime,@Param("status") Integer status, @Param("curUserId")Long curUserId,@Param("curUserName") String curUserName,@Param("date") Date date);

    Page<MsgSeekHelpInfoVO> listMsgHis(@Param("rsId")Long rsId,@Param("beginMsgTimeStr") String beginMsgTimeStr,@Param("endMsgTimeStr") String endMsgTimeStr,@Param("msgAttachmentAddr") String msgAttachmentAddr);

    void delMsg(@Param("id") Long id);

    boolean insertForWechat(@Param("msgAttachmentAddr")String msgAttachmentAddr, @Param("msgTxtContent")String msgTxtContent, @Param("msgTime")Date msgTime,
                             @Param("msgContentType")Integer msgContentType, @Param("radioLen")Integer radioLen, @Param("positionCoor")String positionCoor, @Param("positionName")String positionName,
                             @Param("rsId")Long rsId, @Param("userId")Long userId,
                             @Param("wechatIdData")String wechatIdData, @Param("wechatMsgData")String wechatMsgData, @Param("wechatUserData")String wechatUserData,
                             @Param("msgType")Integer msgType, @Param("msgDirect")Integer msgDirect, @Param("status")Integer status, @Param("messageFrom")Integer messageFrom);

}